fix(pathFilter): don't let a release tag on a descendant commit hide pending changes - #94
Merged
jmongard merged 1 commit intoJul 24, 2026
Conversation
…n earlier commit's version walk pathFilter's boundary computation (computeRelevantShas -> getVersionTagObjectIds) fed EVERY tag matching releaseTagNameFormat into RevWalk.markUninteresting(), regardless of whether that tag's commit was actually an ancestor of `head`. markUninteresting() propagates to all ancestors of the commit it's given. If a release tag sits on a commit that is a *descendant* of `head` (e.g. a build for an older commit is retried/delayed and, by the time it runs, a later commit has already been released), marking that descendant uninteresting also marks `head` itself uninteresting -- making every pending commit since the real last release look irrelevant. The version then silently fails to bump, with no error. Restrict tag boundaries to actual ancestors of `head` via RevWalk.isMergedInto() before using them to bound the pathFilter walk.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
GitProvider.computeRelevantShas()bounds thepathFilterwalk using every tagmatching
releaseTagNameFormat, without checking whether that tag's commit is anancestor of
head:RevWalk.markUninteresting()propagates UNINTERESTING to all ancestors of the givencommit. If a release tag sits on a commit that is a descendant of
head, marking ituninteresting also marks
head(and everything before it) uninteresting. Everypending commit since the real last release then looks irrelevant, and the version
silently fails to bump — no error,
getReleaseVersion()just returns the last knownversion.
This is a race: it only shows up when computing the version for an older commit is
delayed long enough for another build, on a newer descendant commit, to finish and
push its own release tag first.
Repro:
v1.0.0is tagged.fix:) lands — pending.feat:), a descendant of A, lands and gets released asv1.1.0beforeA's own version computation runs.
expected patch bump.
Fix
Restrict tag boundaries to ancestors of
head(viaRevWalk.isMergedInto()) beforeusing them to bound the pathFilter walk.
Testing
Added two regression tests to
GitProviderPathFilterTestreproducing the above shape(
semVersionandchangeLog). Confirmed both fail pre-fix with the same symptom andpass post-fix.